import { HomeData } from '../../api/index'
Page({
  data:{
    bannerList: [],
    categoryList: [],
    activeList: [],
    hotList: [],
    guessList: [],
    loading: true
  },
  async getData(){
    const res = await HomeData()
    this.setData({
      bannerList: res[0].data,
      categoryList: res[1].data,
      activeList: res[2].data,
      guessList: res[3].data,
      hotList: res[4].data,
      loading: false
    })
  },
  onLoad(){
    this.getData()
  },
  onShareAppMessage(){
    return {
      title: "所有的怦然心动，都是你",
      path: "/pages/index/index",
      imgageUrl: "@/assets/imagers/love.jpg"
    }
  },
  onShareTimeline(){
    return {
      title: "所有的怦然心动，都是你",
      imgageUrl: "@/assets/imagers/love.jpg"
    }
  }
})
